package edu.guet.cn.blogbasics.service;

import edu.guet.cn.blogbasics.entity.Users;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hejianding
 * @since 2021-03-30
 */
@Transactional(rollbackFor = Exception.class) //开启事务管理
public interface UsersService extends IService<Users> {

    Users login(Users users);

    Users findByName(String userName);

    List<String> getRolesByUserName(String userName);

    Users insertUsers(Users users);

    Users findByNickName(String nickName);

    void updatePassword(String userName, String oldPassword, String newPassword);
}